<template>
<section class="site-index">
  <div class="site-home-header">上海市安装行业协会官方网站</div>
  <div class="home-img">
    <img src="../assets/icon/banner.png" alt="">
  </div>
  <div class="home-nav">
    <div class="mod-item">
      <div class="mod" @click="goAssilution">
        <div class="nav-icon icon-1">
          <img src="../assets/icon/nav1.png" alt="">
        </div>
        <span class="tip">关于协会</span>
      </div>
      <div class="mod" @click="goRules">
        <div class="nav-icon icon-2">
          <img src="../assets/icon/nav2.png" alt="">
        </div>
        <span class="tip">政策法规</span>
      </div>
      <div class="mod" @click="goBuild">
        <div class="nav-icon icon-3">
          <img src="../assets/icon/nav3.png" alt="">
        </div>
        <span class="tip">党建联建</span>
      </div>
      <div class="mod" @click="goVip">
        <div class="nav-icon icon-4">
          <img src="../assets/icon/nav4.png" alt="">
        </div>
        <span class="tip">会员中心</span>
      </div>
    </div>
    <div class="mod-item">
      <div class="mod" @click="goCXPY">
        <div class="nav-icon icon-5">
          <img src="../assets/icon/nav5.png" alt="">
        </div>
        <span class="tip">创优评先</span>
      </div>
      <div class="mod" @click="goKJW">
        <div class="nav-icon icon-6">
          <img src="../assets/icon/nav6.png" alt="">
        </div>
        <span class="tip">科技委</span>
      </div>
      <div class="mod" @click="goHYPX">
        <div class="nav-icon icon-7">
          <img src="../assets/icon/nav7.png" alt="">
        </div>
        <span class="tip">行业培训</span>
      </div>
      <div class="mod" @click="goInstaller">
        <div class="nav-icon icon-8">
          <img src="../assets/icon/nav8.png" alt="">
        </div>
        <span class="tip">服务平台</span>
      </div>
    </div>
  </div>
  <div class="home-content">
    <div class="bg-xh bg1" @click="goAssilution">
      <span class="text">上海市安装行业协会</span>
    </div>
    <div class="bg-xh bg2" @click="goInstaller">
      <span class="text">安装人数字网络平台</span>
    </div>
    <div class="home-lute min-pc-center-width">
      <div class="lute-right">
        <div class="head">
          <span class="title">最新动态</span>
        </div>
        <div class="item-mod" v-for="(item,index) in news" :key="index" @click="toDetail(item)">
          <div class="left">
            <div class="text">
              <span class="circel"></span>
              <span class="name">{{item.title}}</span>
            </div>
            <p class="time">{{item.submit_time}}</p>
          </div>
          <img class="right" :src="item.showPath" alt="img">
        </div>
      </div>
    </div>
  </div>
</section>
</template>
<script>
export default {
  data () {
    return {
      news: []
    }
  },
  components: {
  },
  created () {
    this.getNewTitles()
  },
  computed: {
  },
  methods: {
    goInstaller () {
      this.$router.push({ path: '/install' })
    },
    toDetail (item) {
      this.$router.push({ path: `/information`, query: { name: '最新动态', id: item.id } })
      // this.$router.push({ path: `/fold/${item.id}` })
    },
    goAssilution () {
      this.$router.push({ path: '/association/product' })
    },
    goRules () {
      this.$router.push({ path: '/regulations/country' })
    },
    goBuild () {
      this.$router.push({ path: '/party/affairs' })
    },
    goCXPY () {
      this.$router.push({ path: '/innovation' })
    },
    goVip () {
      this.$router.push({ path: '/vip' })
    },
    goKJW () {
      this.$router.push({ path: '/expert' })
    },
    goHYPX () {
      this.$router.push({ path: '/train' })
    },
    getNewTitles () {
      this.$http.getNewTitles({}, 1, 6).then(res => {
        this.news = res.data.list
      })
    }
  }
}
</script>
<style lang="scss">
</style>
